# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
pkgname=attica5
pkgver=5.113.0
pkgrel=0
pkgdesc="Freedesktop OCS binding for Qt"
url="https://www.kde.org/"
arch="all !armhf" # Blocked by extra-cmake-modules
license="LGPL-2.0-or-later"
makedepends="
	doxygen
	extra-cmake-modules
	qt5-qtbase-dev
	qt5-qttools-dev
	samurai
	"
subpackages="$pkgname-dev $pkgname-doc"
_repo_url="https://invent.kde.org/frameworks/attica.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/attica-$pkgver.tar.xz"
builddir="$srcdir/attica-$pkgver"

replaces="attica<=5.110.0-r0"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	# providertest requires network access
	ctest --test-dir build --output-on-failure -E "providertest"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
7bd9f98f151c59f01fa1885be5b5d17e1af8b69b2e2a066913066f14a03196972710c7605ce1bb5c505e0b0d6b940233c5043d77ccc8906dc71a80339fe375e1  attica-5.113.0.tar.xz
"
